<!DOCTYPE html>
<html lang="zh">
<head>
    <meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" name="viewport">
    <meta name="format-detection" content="telephone=no">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <title>发布出租车</title>
    <link href="css/main.css" rel="stylesheet" type="text/css"/>
    <link href="libs/iosselect/iosSelect.css" rel="stylesheet" type="text/css"/>
</head>
<body id="fbczc">
    <div class="container" >
        <div class="bk-01">
            <h3>出租车LED广告</h3>
            <p>这种媒体因其即时性、灵活性、流动性、鲜明性、覆盖面广的新颖特点，说明文字说明文字说明文字。</p>
        </div>
        <div class="bk-02">
            <textarea  maxlength="40" class="textarea"></textarea>
            <p class="str"><i>0</i>/40字</p>
            <div class="tips">
                请输入发布文字:<br>
                每屏幕显示8个字符。建议文字不超过40字
            </div>
        </div>
        <div class="bk-03">
            <ul>
                <li class="industry">
                    <span>行业分类</span>
                    <span class="showDate">吃喝玩乐</span>
                </li>
                <li class="times">
                    <span>发布时间</span>
                    <span class="time-limit">选择发布日期、时段</span>
                </li>
                <li class="coupon mt">
                    <span>优惠券</span>
                    <span class="tag">免单券</span>
                </li>
            </ul>
        </div>
        <div class="bk-04">
            <ul>
                <li><span>产品总计：</span><span>¥<i>322.00</i></span></li>
                <li><span>优惠券抵：</span><span>-¥<i>5.00</i></span></li>
            </ul>
            <div class="clause">
                <div class="checkbox red act"></div>
                <p>本人同意并接受<span>《平台发布规范》</span></p>
            </div>
        </div>
        <div class="bk-05">
            <div class="btn-order">提交订单</div>
            <div class="bk-pay">
                <p>实际应付款</p>
                <p>¥<i>322.00</i></p>
            </div>
        </div>
    </div>
    <script src="js/rem.js"></script>
    <script src="js/jquery.js"></script>
    <script src="libs/iosselect/iscroll.js"></script>
    <script src="libs/iosselect/iosSelect.js"></script>
    <script>
        $(function () {
            console.log($(".textarea"))
            var industry={
                arr1:[
                    {'id': '110000', 'value': '北京市', 'parentId': '0'},
                    {'id': '120000', 'value': '天津市', 'parentId': '0'},
                    {'id': '130000', 'value': '河北省', 'parentId': '0'}
                ],
                arr2:[
                    {"id":"110100","value":"北京市","parentId":"110000"},
                    /**********天津市********/
                    {"id":"120100","value":"天津市","parentId":"120000"},
                    /**********河北省********/
                    {"id":"130100","value":"石家庄市","parentId":"130000"},
                    {"id":"130200","value":"唐山市","parentId":"130000"},
                    {"id":"130300","value":"秦皇岛市","parentId":"130000"},
                    {"id":"130400","value":"邯郸市","parentId":"130000"},
                    {"id":"130500","value":"邢台市","parentId":"130000"},
                    {"id":"130600","value":"保定市","parentId":"130000"},
                    {"id":"130700","value":"张家口市","parentId":"130000"},
                    {"id":"130800","value":"承德市","parentId":"130000"},
                    {"id":"130900","value":"沧州市","parentId":"130000"},
                    {"id":"131000","value":"廊坊市","parentId":"130000"},
                    {"id":"131100","value":"衡水市","parentId":"130000"}
                ]
            }
            $('.times').click(function(){
                var iosSelectTimes = new IosSelect(2,
                    [industry.arr1,industry.arr2],
                    {
                        title: '发布时间',
                        itemHeight:35,
                        headerHeight:44,
                        showLoading:true,
                        relation: [1, 0, 0, 0],
                        callback: function (selectOneObj,selectTwoObj) {
                            console.log(selectOneObj.value+"/"+selectTwoObj.value)
                            $(".time-limit").text(selectOneObj.value+"/"+selectTwoObj.value)

                        }
                    });
            });
            $('.industry').click(function(){
                var iosSelectIndustry = new IosSelect(1,
                    [industry.arr2],
                    {
                        title: '行业分类',
                        itemHeight:35,
                        headerHeight:44,
                        showLoading:true,
                        callback: function (selectOneObj) {
                            console.log(selectOneObj.value)
                            $(".showDate").text(selectOneObj.value)

                        }
                    });
            });

            $('.coupon').click(function(){
                var iosSelectIndustry = new IosSelect(1,
                    [industry.arr2],
                    {
                        title: '行业分类',
                        itemHeight:35,
                        headerHeight:44,
                        showLoading:true,
                        callback: function (selectOneObj) {
                            console.log(selectOneObj.value)
                            $(".tag").text(selectOneObj.value)

                        }
                    });
            });

            $(".tips").on("click",function () {
                $(".tips").hide();
                $(".textarea").focus()

            });
            $(".textarea").blur(function () {
                console.log($(".textarea").val().length)
                if($(".textarea").val().length == 0){
                    $(".tips").show();
                }
            })

        })
    </script>
</body>
</html>